<?php

function getFilename ( $path )
{
    $aPath = explode('/', $path);
    $aPath = array_reverse($aPath);
    return $aPath[0];
}